package com.wanghaoran.dto;

import com.wanghaoran.constant.MC;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author wanghaoran
 */
@Schema(description = "资产申请修改DTO")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AssetsBorrowUpdateDTO implements Serializable {

    @Schema(description = "资产申请主键")
    @NotNull(message = "资产申请主键不能为空")
    private Long Id;

    @Schema(description = "资产外键")
    private Long fkAssetsId;

    @Schema(description = "员工外键")
    private Long fkEmpId;

    @Schema(description = "申请数量")
    @Min(value = 0, message = "申请数量不能小于0")
    private Integer count;

    @Schema(description = "申请描述")
    @Pattern(regexp = MC.Regex.INFO_RE, message = MC.Regex.INFO_RE_MSG)
    private String info;

    @Schema(description = "申请时间")
    private LocalDateTime borrowTime;

    @Schema(description = "预计归还时间")
    private LocalDateTime expectedReturnTime;

    @Schema(description = "实际归还时间")
    private LocalDateTime returnTime;


}
